﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Business.Migrations
{
    public partial class demo10 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "AllocationDesc",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    Number = table.Column<int>(type: "int", nullable: false),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SKU = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HandInventory = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AllocationQuantity = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OutboundWarehouse = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IncomingWarehouse = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BatchNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ValidDate = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Packing = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Desc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CorrelationID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AllocationDesc", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "DatabaseSum",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    DocumentName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DocumentNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DateTransfer = table.Column<DateTime>(type: "datetime2", nullable: false),
                    WarehouseStaff = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Associate = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Desc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BringRepository = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecallProduct = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DatabaseSum", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "PreciseLibrary",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    DocumentName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DocumentNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DateTransfer = table.Column<DateTime>(type: "datetime2", nullable: false),
                    WarehouseStaff = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Associate = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Desc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BringRepository = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RecallProduct = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PreciseLibrary", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Sale",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    Suname = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Sucontract = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Supersonnel = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Returnpersonnel = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Dosubject = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Recode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Representative = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MyRepresentative = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Retype = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Redatetimes = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Reitem = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Refundway = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Reway = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Readdress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Redesc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sale", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SaPro",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    Spid = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Saname = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Sacode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Saspecification = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Saunit = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Sanum = table.Column<int>(type: "int", nullable: false),
                    Saprice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Sabilltype = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Sarate = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SainclusivePrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Sauntaxedmoney = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Saamount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Sasummoney = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Saselect = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Lotnumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Effectivedate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Givedate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Arrivedate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Sadesc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SaPro", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SumTransfers",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
                    Number = table.Column<int>(type: "int", nullable: false),
                    ProductName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SKU = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HandInventory = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AllocationQuantity = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    OutboundWarehouse = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IncomingWarehouse = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Desc = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PreciseID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SumTransfers", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AllocationDesc");

            migrationBuilder.DropTable(
                name: "DatabaseSum");

            migrationBuilder.DropTable(
                name: "PreciseLibrary");

            migrationBuilder.DropTable(
                name: "Sale");

            migrationBuilder.DropTable(
                name: "SaPro");

            migrationBuilder.DropTable(
                name: "SumTransfers");
        }
    }
}
